{extend name="public:layout" /}

{block name="title"}
    <title>{:site('siteName')}-账户明细</title>
{/block}

{block name="css"}
    <style>
        .layui-tab-title li{width:50%;}
        .layui-tab-content {padding:0;}
        .layui-table td, .layui-table th{padding:5px 2px;}
        .sell-tab { height: 40px; border-bottom: 1px solid #e2e2e2 }
        .sell-tab li { width: 50%; float: left; text-align: center; line-height: 40px; }
        .sell-tab .this { color: #009688; border-bottom: 3px solid #5FB878; margin-bottom: -3px;}
    </style>
{/block}

{block name="content"}
    <div class="head">账户明细</div>
    <ul class="sell-tab">
        <li class="{if $Request.get.type}this{/if}">
            <a href="/account/record?type=1">收入明细</a>
        </li>
        <li class="{if !$Request.get.type == 1}this{/if}">
            <a href="/account/record?type=0">支出明细</a>
        </li>
    </ul>
    <table class="layui-table">
          <colgroup>
            <col width="50">
            <col width="50">
            <col>
            <col width="50">
        </colgroup>
        <thead>
            <tr>
                <th>时间</th>
                <th>类型</th>
                <th>原因</th>
                <th>金额</th>
            </tr>
        </thead>
        <tbody>
            {volist name="record" id="v"}
                <tr>
                    <td>{:date('m-d H:i',$v['time'])}</td>
                    <td>{$currency[$v['currency']]}</td>
                    <td>{$v['message']}</td>
                    {if $Request.get.type}
                        <td style="color: #5FB878;">+{$v['money']}</td>
                    {else /}
                        <td style="color: #FF5722;">{$v['money']}</td>
                    {/if}
                </tr>
            {/volist}
        </tbody>
    </table>
    <div class="page">
        {$record->render()}
    </div>
{/block}

{block name="script"}{/block}
